package movee.spring.app.template.domain.query;

import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.List;

/**
 *
 *
 * @author movee
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@ApiModel(description = "查询条件")
public class OrderSearchQuery {

    @ApiModelProperty(value = "order id")
    private Long id;

    @ApiModelProperty(value = "名字")
    private String name;

    @ApiModelProperty(value = "创建时间")
    private String createTime;

    @ApiModelProperty(value = "更新时间")
    private String updateTime;

    @ApiModelProperty(value = "查询页号，默认值1")
    private Integer page = 1;

    @ApiModelProperty(value = "查询页面大小，默认值20")
    private Integer pageSize = 20;

    @ApiModelProperty(value = "结果排序方式，默认按order id降序排序")
    private List<String> sort = Lists.newArrayList("id", "desc");
}
